package dao;

import essenceClasses.Task;
import interfaceDao.ITaskDao;
import model.TaskModel;

import java.sql.SQLException;
import java.util.Calendar;
import java.sql.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 25.05.14
 * Time: 12:22
 * To change this template use File | Settings | File Templates.
 */
public class TaskDao implements ITaskDao {
    private TaskModel taskModel;

    public TaskDao() {
        this.taskModel = new TaskModel();
    }

    @Override
    public List<Task> getAllTasks() throws SQLException {
        return taskModel.getAllTasks();  //To change body of implemented methods use File | Settings | File Templates.
    }



    @Override
    public boolean addTask(String title, String description, int priority, java.sql.Date createDate,java.sql.Date startDate, java.sql.Date endDate) throws SQLException {
        return taskModel.addTask(title, description, priority, createDate, startDate, endDate);
    }


}
